import Vue from 'vue'
import Vuex from 'vuex';
Vue.use(Vuex);
const vuex_store = new Vuex.Store({
    state: {
        count: 0,
        name: '',
        authType: ''
    },
    mutations: {
        increment(state, name) {
            state.name = name;
        },
        addUser(state, resData) {
            state.name = resData.username;
            state.authType = resData.authType;
        },
         removeUser(state, resData) {
            state.name ='';
            state.authType = '';
        }
    }
})
export default vuex_store